<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition>

	<!-- LEFT MENU -->
	<h:panelGroup layout="block" id="contentLeft">

		<ul id="leftMenu">

			<h:panelGroup rendered="true">
				<li><h:form>
						<h:outputText value="Employee Management"
							styleClass="outputLeftMenu" />
					</h:form></li>
				<ul>
					<h:form>
						<li><h:commandLink
								rendered="#{controllerBean.canCRUDOnEmployees()}"
								value="Add employee" styleClass="cmdLink"
								action="addEmployee.xhtml" /></li>
						<li><h:commandLink
								rendered="#{controllerBean.canCRUDOnEmployees()}"
								action="addTrainee.xhtml" styleClass="cmdLink"
								value="Add trainee" /></li>

						<li><h:commandLink rendered="true"
								action="searchUsers.xhtml" value="Search" styleClass="cmdLink" /></li>
					</h:form>
				</ul>
			</h:panelGroup>

			<h:panelGroup rendered="#{controllerBean.canViewCandidateManagement()}">
				<li><h:form>
						<h:outputText  value="Candidate Management"
							styleClass="outputLeftMenu" />
					</h:form></li>
				<ul>
					<h:form>
						<li><h:commandLink rendered="true" value="Add candidate"
								styleClass="cmdLink" action="addCandidate.xhtml" /></li>

						<li><h:commandLink rendered="true" action="listOfCandidates.xhtml"
								styleClass="cmdLink" value="Search" /></li>
					</h:form>
				</ul>
			</h:panelGroup>



			<h:panelGroup rendered="#{controllerBean.canViewLibraryManagement()}"
				layout="block">
				<li><h:form>
						<h:outputText value="Library Management"
							styleClass="outputLeftMenu" />
					</h:form></li>
				<ul>
					<h:form>

						<li><h:commandLink
								rendered="#{controllerBean.canManageLibrary()}"
								action="#{bookTableData.startBookCRUD}" styleClass="cmdLink"
								value="Manage books" /></li>

						<li><h:commandLink action="#{bookTableData.startBookUser}"
								styleClass="cmdLink" value="My books" /></li>

						<li><h:commandLink action="#{bookTableData.startBookSearch}"
								styleClass="cmdLink" value="Search" /></li>

						<li><h:commandLink
								rendered="#{controllerBean.canManageLibrary()}"
								action="bookViewSuggestions.xhtml" styleClass="cmdLink"
								value="Suggestions" /></li>

					</h:form>


				</ul>
			</h:panelGroup>

			
			<h:panelGroup rendered="true" layout="block">
				<li><h:form>
						<h:outputText value="Survey Management"
							styleClass="outputLeftMenu" />
					</h:form></li>
				<ul>
					<h:form>
						<li><h:commandLink
								rendered="#{controllerBean.canViewSurveyManagement()}"
								action="surveyCreate.xhtml" styleClass="cmdLink"
								value="Create survey" /></li>
						<li><h:commandLink action="mySurveys.xhtml"
								styleClass="cmdLink" value="My surveys" /></li>
						<li><h:commandLink action="surveyListForUser.xhtml"
								rendered="#{controllerBean.canViewSurveyManagement()}"
								styleClass="cmdLink" value="Generate statistics" /></li>
						<li><h:commandLink action="manageGroups.xhtml"
							rendered="#{controllerBean.canViewSurveyManagement()}"
								styleClass="cmdLink" value="Group Management" /></li>
					</h:form>
				</ul>
			</h:panelGroup>


			


			<h:panelGroup rendered="#{controllerBean.canViewReportsManagement()}" layout="block"><!-- canCreateGeneralReports sau canCreateConfidentialReports -->
				<li><h:form>
						<h:outputText value="Reports" styleClass="outputLeftMenu" />
					</h:form></li>
				<ul>
					<h:form>
						<li><h:commandLink rendered="#{controllerBean.canViewCreateReports()}"
								action="createReport.xhtml" styleClass="cmdLink" value="Create" /></li>
						<li><h:commandLink rendered="#{controllerBean.canViewOpenReports()}"
								action="manageReports.xhtml" styleClass="cmdLink"
								value="Manage my reports" /></li>
					</h:form>
				</ul>
			</h:panelGroup>

		</ul>
	</h:panelGroup>
	<!-- END OF LEFT MENU -->
</ui:composition>
</html>